	
<html>
<head>
</head>
<meta http-equiv="Content-Type" content="text/html ;charset=utf-8"/>

<style Type="text/css">

.class01{
	font-family: LucidaHandwriting;
	background-color: sandybrown;
	color: floralwhite;
	font-weight: bold;
	font-size: 44px;
}
.class02{
font-family: cursive;
font-size: 24;
color: lightslategrey;
}
.classLabel{
border-left-width: 2px;
margin-left: 2px;
width: 173px;
height: 31px;
font-size:26px;
align:right;
}
</style>
<body>
<?php
if(isset($_POST["before"]) && isset($_POST["after"]) && isset($_POST["dongia"]))
{
$before = $_POST["before"];
$after = $_POST["after"];
$dongia = $_POST["dongia"];
$thanhtoan = ($after - $before) * $dongia;
}
?>
<form name="form1" id="form1" action="thanhtoantiendien.php" method="post">

<table align="center" style="background-color: bisque">

<tr>
<td colspan="2"  align="center"><span class="class01">thanh toán tiền điện</span></td>
</tr>

<tr>
<td><span class="class02">tên chủ hộ</span></td>
<td><label><input class="classLabel" name="ten" id="ten" type="text" value="<?php if(isset($_POST["ten"])){echo $_POST["ten"];} ?>" /></label></td>
</tr>

<tr>
<td><span class="class02">chỉ số cũ</span></td>
<td><label><input class="classLabel"name="before" id="before" type="text" value="<?php if(isset($_POST["before"])){echo $_POST["before"];}?>"/></label><span class="class02">(kw)</span></td>
</tr>

<tr>
<td><span class="class02">chỉ số mới</span></td>
<td><label><input class="classLabel" name="after" id="after" type="text" value="<?php if(isset($_POST["after"])){echo $_POST["after"];}?>"/></label><span class="class02">(kw)</span></td>
</tr>

<tr>
<td><span class="class02">đơn giá</span></td>
<td><label><input class="classLabel" name="dongia" id="dongia" type="text" value="2000" readonly="true"/></label><span class="class02">(VNđ)</span></td>
</tr>

<tr>
<td><span class="class02">số tiền thanh toán</span></td>
<td><label><input class="classLabel" name="thanhtoan" id="thanhtoan" type="text" value="<?php if(isset($_POST["thanhtoan"])){echo $thanhtoan;}?>" readonly="true"/></label><span class="class02">(VNđ)</span></td>
</tr>	

<tr>
<td colspan ="2" align="center"><label><input class="class02" style="color:blue" name="submit" type="submit" value="Tính"/></label></td>
<td colspan ="2">&nbsp </td>
</tr>

</table>
</form>
</body>
</html>




